package com.ychen.other;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;

/**
 * @Author chenyuliao
 * @Date 2019/7/18 22:27
 */
public class Test01 {
    public static void main(String[] args) {
        User user = new User();
        user.setAge(12);
        user.setName("张三");
        System.out.println(JSON.toJSONString(user));
        System.out.println(JSON.toJSONString(user, SerializerFeature.WriteClassName));
    }
}
